package cc.comac.mom.api;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import cc.comac.mom.bean.EquipDev;
import cc.comac.mom.bean.EquipDevBean;
import cc.comac.mom.util.ResultBean;

@FeignClient(name = "mom-equipment-mgmt-srv")
public interface EquipDevService {
	
	@RequestMapping(value = "/p/cs/EquipDevService/save",method = RequestMethod.POST)
	ResultBean save(@RequestBody EquipDev obj);
	
	@RequestMapping(value = "/p/cs/EquipDevService/update",method = RequestMethod.POST)
	ResultBean update(@RequestBody EquipDev obj);
	
	@RequestMapping(value = "/p/cs/EquipDevService/delete",method = RequestMethod.POST)
	ResultBean delete(@RequestBody EquipDev obj);
	
	@RequestMapping(value = "/p/cs/EquipDevService/getById",method = RequestMethod.POST)
	EquipDev getById(@RequestBody EquipDev obj);
	
	@RequestMapping(value = "/p/cs/EquipDevService/selectByCondition",method = RequestMethod.POST)
	ResultBean selectByCondition(@RequestBody EquipDev obj);

	@RequestMapping(value = "/p/cs/EquipDevService/select",method = RequestMethod.POST)
	ResultBean select(@RequestBody EquipDevBean obj);

	@RequestMapping(value = "/p/cs/EquipDevService/selectAllData",method = RequestMethod.POST)
	public ResultBean selectAllData ();
	
	@RequestMapping(value = "/p/cs/EquipDevService/importEquipDev",consumes = MediaType.MULTIPART_FORM_DATA_VALUE,method = RequestMethod.POST)
	ResultBean importEquipDev(@RequestPart("file") MultipartFile file,@RequestParam(value = "rootPath") String rootPath)throws IOException;
	
	@RequestMapping(value = "/p/cs/EquipDevService/exportData",method = RequestMethod.POST)
	String exportData(@RequestParam(value = "request") HttpServletRequest request, @RequestParam(value = "request") HttpServletResponse response,@RequestBody EquipDevBean obj);
}
